/**
 * WC Product Inquiry – Frontend Styles
 *
 * PAGEBUILDER COMPATIBILITY RULES (Chapter 2 of spec):
 *  - NO font-family declarations (inherit everywhere)
 *  - ALL colors via CSS Custom Properties (var(--wcpi-color-*))
 *  - NO !important
 *  - NO ID selectors
 *  - box-sizing: border-box scoped to .wcpi-form * only
 *  - BEM naming with .wcpi- prefix
 *  - Low specificity (class selectors only)
 */

/* =========================================================================
   CSS Custom Properties (fallback defaults – overridden by PHP inline style)
   ========================================================================= */

:root {
    --wcpi-color-primary:       #006AB3;
    --wcpi-color-primary-hover: #005a96;
    --wcpi-color-text:          #1a1a1a;
    --wcpi-color-text-light:    #666666;
    --wcpi-color-background:    #ffffff;
    --wcpi-color-surface:       #f5f5f5;
    --wcpi-color-border:        #d0d0d0;
    --wcpi-color-error:         #dc3545;
    --wcpi-color-success:       #006AB3;
    --wcpi-color-button-text:   #ffffff;

    /* Spacing & sizing tokens */
    --wcpi-input-height:  48px;
    --wcpi-section-gap:   24px;
    --wcpi-radius-sm:     6px;
    --wcpi-radius-md:     10px;
    --wcpi-radius-lg:     12px;
}

/* =========================================================================
   Box-sizing scope (only inside .wcpi-form)
   ========================================================================= */

.wcpi-form *,
.wcpi-form *::before,
.wcpi-form *::after {
    box-sizing: border-box;
}

/* =========================================================================
   Wrapper & container
   ========================================================================= */

.wcpi-wrapper {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-family: inherit;
    color: var(--wcpi-color-text);
}

.wcpi-form {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: var(--wcpi-color-text);
    background: var(--wcpi-color-background);
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-lg);
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.04);
}

.wcpi-form__title {
    font-family: inherit;
    margin-top: 0;
    margin-bottom: 28px;
    font-size: 1.5em;
    font-weight: 700;
}

/* =========================================================================
   Progress bar
   ========================================================================= */

.wcpi-progress {
    margin-bottom: 32px;
}

.wcpi-progress__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    counter-reset: step;
}

.wcpi-progress__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}

.wcpi-progress__item::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -50%;
    width: 100%;
    height: 2px;
    background-color: var(--wcpi-color-border);
    z-index: 0;
}

.wcpi-progress__item:first-child::before {
    display: none;
}

.wcpi-progress__item--completed::before {
    background-color: var(--wcpi-color-primary);
}

.wcpi-progress__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--wcpi-color-border);
    background-color: var(--wcpi-color-background);
    color: var(--wcpi-color-text-light);
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.wcpi-progress__item--active .wcpi-progress__number {
    box-shadow: 0 0 0 4px rgba(0, 106, 179, 0.15);
}

.wcpi-progress__item--completed .wcpi-progress__number {
    box-shadow: 0 0 0 4px rgba(0, 106, 179, 0.1);
}

.wcpi-progress__item--active .wcpi-progress__number {
    border-color: var(--wcpi-color-primary);
    background-color: var(--wcpi-color-primary);
    color: var(--wcpi-color-button-text);
}

.wcpi-progress__item--completed .wcpi-progress__number {
    border-color: var(--wcpi-color-primary);
    background-color: var(--wcpi-color-primary);
    color: var(--wcpi-color-button-text);
}

.wcpi-progress__label {
    margin-top: 6px;
    font-family: inherit;
    font-size: 12px;
    color: var(--wcpi-color-text-light);
}

.wcpi-progress__item--active .wcpi-progress__label {
    color: var(--wcpi-color-text);
    font-weight: 600;
}

/* =========================================================================
   Steps – show/hide + fade-slide animation
   ========================================================================= */

.wcpi-step {
    display: none;
}

.wcpi-step--active {
    display: block;
    animation: wcpiFadeSlideIn 0.25s ease both;
}

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

.wcpi-step__title {
    font-family: inherit;
    margin-top: 0;
    margin-bottom: 20px;
}

/* =========================================================================
   Step navigation buttons row
   ========================================================================= */

.wcpi-step__nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--wcpi-color-border);
    align-items: center;
}

.wcpi-step__nav--right {
    justify-content: flex-end;
}

/* =========================================================================
   Customer type selector (Step 1) – segmented toggle
   ========================================================================= */

.wcpi-type-intro {
    text-align: center;
    margin-bottom: 32px;
}

.wcpi-type-intro__question {
    font-family: inherit;
    font-size: 1.25em;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--wcpi-color-text);
}

.wcpi-type-intro__sub {
    font-family: inherit;
    font-size: 0.9em;
    color: var(--wcpi-color-text-light);
    margin: 0;
}

.wcpi-type-toggle {
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-type-toggle__track {
    display: flex;
    gap: 4px;
    background: var(--wcpi-color-surface);
    border: 1.5px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-lg);
    padding: 4px;
}

.wcpi-type-toggle__option {
    flex: 1;
    cursor: pointer;
}

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

.wcpi-type-toggle__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 18px 24px;
    border-radius: calc(var(--wcpi-radius-lg) - 2px);
    text-align: center;
    font-family: inherit;
    color: var(--wcpi-color-text-light);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.wcpi-type-toggle__label strong {
    font-size: 1em;
    font-weight: 700;
    line-height: 1.2;
}

.wcpi-type-toggle__label small {
    font-size: 0.8em;
    font-weight: 400;
    opacity: 0.85;
}

.wcpi-type-toggle__option:hover .wcpi-type-toggle__label {
    color: var(--wcpi-color-text);
    background-color: rgba(255, 255, 255, 0.6);
}

.wcpi-type-toggle__option input[type="radio"]:checked + .wcpi-type-toggle__label {
    background-color: var(--wcpi-color-primary);
    color: var(--wcpi-color-button-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.wcpi-type-toggle__option input[type="radio"]:checked + .wcpi-type-toggle__label small {
    opacity: 0.85;
}

.wcpi-type-toggle__option input[type="radio"]:focus-visible + .wcpi-type-toggle__label {
    outline: 2px solid var(--wcpi-color-primary);
    outline-offset: 2px;
}

/* =========================================================================
   Product search (Step 2)
   ========================================================================= */

.wcpi-product-search {
    margin-bottom: 16px;
}

.wcpi-product-search__input {
    width: 100%;
    padding: 12px 16px;
    min-height: var(--wcpi-input-height);
    border: 1.5px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    font-family: inherit;
    font-size: inherit;
    color: var(--wcpi-color-text);
    background-color: var(--wcpi-color-background);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.wcpi-product-search__input:focus-visible {
    outline: none;
    border-color: var(--wcpi-color-primary);
    box-shadow: 0 0 0 3px rgba(0, 106, 179, 0.12);
}

/* =========================================================================
   Product grid
   ========================================================================= */

.wcpi-product-grid {
    display: grid;
    gap: 16px;
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-product-grid--cols-1 { grid-template-columns: 1fr; }
.wcpi-product-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.wcpi-product-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.wcpi-product-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =========================================================================
   Product card (grid view)
   ========================================================================= */

.wcpi-product-card {
    border: 1.5px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    overflow: hidden;
    background: var(--wcpi-color-background);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wcpi-product-card:hover {
    border-color: var(--wcpi-color-primary);
    box-shadow: 0 4px 12px rgba(0, 106, 179, 0.1);
}

.wcpi-product-card__image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: var(--wcpi-color-surface);
}

.wcpi-product-card__body {
    padding: 12px 14px;
}

.wcpi-product-card__name {
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    color: var(--wcpi-color-text);
    margin: 0 0 6px;
}

.wcpi-product-card__price {
    font-size: 13px;
    color: var(--wcpi-color-text-light);
    margin: 0 0 10px;
}

/* =========================================================================
   Product table (compact list view)
   ========================================================================= */

.wcpi-product-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 16px;
    table-layout: fixed;
    /* Span all columns when inside a .wcpi-product-grid */
    grid-column: 1 / -1;
}

/* Column widths for product table */
.wcpi-product-table col.col-thumb {
    width: 60px;
}

.wcpi-product-table col.col-name {
    width: auto;
}

.wcpi-product-table col.col-price {
    width: 100px;
}

.wcpi-product-table col.col-custom {
    width: 250px;
}

.wcpi-product-table col.col-qty {
    width: 80px;
}

.wcpi-product-table col.col-action {
    width: 120px;
}

.wcpi-product-table thead th {
    text-align: left;
    padding: 8px 10px;
    font-weight: 600;
    font-size: 12px;
    color: var(--wcpi-color-text-light);
    border-bottom: 2px solid var(--wcpi-color-border);
    white-space: nowrap;
}

.wcpi-product-table tbody td {
    padding: 10px;
    border-bottom: 1px solid var(--wcpi-color-border);
    vertical-align: middle;
}

.wcpi-product-row {
    transition: background-color 0.2s;
}

.wcpi-product-row:hover {
    background-color: var(--wcpi-color-surface);
}

.wcpi-product-row--selected {
    background-color: var(--wcpi-color-surface);
}

.wcpi-product-table__name {
    font-weight: 600;
}

.wcpi-product-table__name span {
    display: block;
    margin-bottom: 4px;
}

.wcpi-variation-select {
    width: 100%;
    max-width: 300px;
    padding: 6px 10px;
    border: 1px solid var(--wcpi-color-border);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background-color: var(--wcpi-color-background);
    color: var(--wcpi-color-text);
    cursor: pointer;
    transition: border-color 0.2s;
}

.wcpi-variation-select:hover {
    border-color: var(--wcpi-color-primary);
}

.wcpi-variation-select:focus {
    outline: none;
    border-color: var(--wcpi-color-primary);
    box-shadow: 0 0 0 2px rgba(0, 106, 179, 0.1);
}

.wcpi-product-table__thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wcpi-product-table__price {
    white-space: nowrap;
}

.wcpi-product-table__price em {
    color: var(--wcpi-color-text-light);
    font-size: 11px;
}

.wcpi-product-table__custom {
    width: 100%;
    padding: 5px 8px;
    min-height: 34px;
    border: 1.5px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-sm);
    font-family: inherit;
    font-size: 12px;
    color: var(--wcpi-color-text);
    background: var(--wcpi-color-background);
    transition: border-color 0.2s;
}

.wcpi-product-table__custom:focus-visible {
    outline: none;
    border-color: var(--wcpi-color-primary);
}

.wcpi-product-table__custom::placeholder {
    color: var(--wcpi-color-text-light);
    font-size: 11px;
}

.wcpi-product-table__qty {
    width: 52px;
    padding: 5px 6px;
    min-height: 34px;
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-sm);
    font-family: inherit;
    font-size: 13px;
    color: var(--wcpi-color-text);
    background: var(--wcpi-color-background);
    text-align: center;
}

.wcpi-product-table__add-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 36px;
    box-shadow: none;
    white-space: nowrap;
    width: 100%;
}

/* =========================================================================
   Selected products summary
   ========================================================================= */

.wcpi-selected-products {
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    padding: 18px;
    background-color: var(--wcpi-color-surface);
    margin-bottom: var(--wcpi-section-gap);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wcpi-selected-products__title {
    font-family: inherit;
    margin-top: 0;
    margin-bottom: 12px;
}

.wcpi-selected-products__empty {
    color: var(--wcpi-color-text-light);
    font-style: italic;
    margin: 0;
    font-family: inherit;
}

.wcpi-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--wcpi-color-border);
}

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

.wcpi-selected-item__info {
    flex: 1;
    min-width: 0;
}

.wcpi-selected-item__name {
    flex: 1;
    font-family: inherit;
    font-weight: 600;
}

.wcpi-selected-item__custom {
    display: block;
    font-size: 11px;
    color: var(--wcpi-color-text-light);
    font-style: italic;
    margin-top: 2px;
}

.wcpi-selected-item__controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wcpi-selected-item__qty-label {
    font-family: inherit;
    font-size: 13px;
}

.wcpi-selected-item__qty {
    width: 60px;
    padding: 4px 6px;
    min-height: 36px;
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-sm);
    font-family: inherit;
    font-size: inherit;
    color: var(--wcpi-color-text);
    background-color: var(--wcpi-color-background);
}

.wcpi-selected-item__remove {
    background: none;
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-sm);
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wcpi-color-error);
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.wcpi-selected-item__remove:hover {
    background-color: var(--wcpi-color-error);
    color: #fff;
    border-color: var(--wcpi-color-error);
}

/* =========================================================================
   Form fields (Step 3)
   ========================================================================= */

.wcpi-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-form-group {
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-form-group label {
    display: block;
    margin-bottom: 6px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
}

.wcpi-form-group input[type="text"],
.wcpi-form-group input[type="email"],
.wcpi-form-group input[type="tel"],
.wcpi-form-group select {
    width: 100%;
    padding: 12px 14px;
    min-height: var(--wcpi-input-height);
    border: 1.5px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    font-family: inherit;
    font-size: inherit;
    color: var(--wcpi-color-text);
    background-color: var(--wcpi-color-background);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.wcpi-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    font-family: inherit;
    font-size: inherit;
    color: var(--wcpi-color-text);
    background-color: var(--wcpi-color-background);
    transition: border-color 0.25s, box-shadow 0.25s;
    resize: vertical;
    min-height: 100px;
}

.wcpi-form-group input:focus-visible,
.wcpi-form-group textarea:focus-visible,
.wcpi-form-group select:focus-visible {
    outline: none;
    border-color: var(--wcpi-color-primary);
    box-shadow: 0 0 0 3px rgba(0, 106, 179, 0.12);
}

.wcpi-input--error {
    border-color: var(--wcpi-color-error);
}

.wcpi-field-error {
    display: block;
    color: var(--wcpi-color-error);
    font-family: inherit;
    font-size: 12px;
    margin-top: 4px;
    min-height: 1em;
}

.wcpi-required {
    color: var(--wcpi-color-error);
    margin-left: 2px;
}

/* =========================================================================
   Business fields (conditionally shown)
   ========================================================================= */

.wcpi-business-fields {
    margin-bottom: 0;
}

/* =========================================================================
   Section titles (Step 3 sub-headings)
   ========================================================================= */

.wcpi-section-title {
    font-family: inherit;
    font-size: 1em;
    font-weight: 700;
    color: var(--wcpi-color-text);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wcpi-color-border);
}

.wcpi-section-title:first-child {
    margin-top: 0;
}

/* PLZ field – slightly narrower but not tiny */
.wcpi-form-group--zip {
    max-width: 200px;
}

/* =========================================================================
   Delivery method selector
   ========================================================================= */

.wcpi-delivery-method {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-delivery-option {
    cursor: pointer;
    flex: 1;
    min-width: 140px;
}

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

.wcpi-delivery-option__card {
    display: block;
    padding: 14px 24px;
    min-height: var(--wcpi-input-height);
    border: 2px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    background-color: var(--wcpi-color-background);
    font-family: inherit;
    text-align: center;
    transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s, transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    line-height: var(--wcpi-input-height);
}

.wcpi-delivery-option__card:hover {
    border-color: var(--wcpi-color-primary);
    box-shadow: 0 4px 12px rgba(0, 106, 179, 0.1);
    transform: translateY(-1px);
}

.wcpi-delivery-option input[type="radio"]:checked + .wcpi-delivery-option__card {
    border-color: var(--wcpi-color-primary);
    background-color: var(--wcpi-color-surface);
    box-shadow: 0 0 0 3px rgba(0, 106, 179, 0.12);
    color: var(--wcpi-color-primary);
}

.wcpi-delivery-option__text {
    font-family: inherit;
    font-weight: 600;
    font-size: inherit;
}

/* =========================================================================
   Shipping fields container
   ========================================================================= */

.wcpi-shipping-fields {
    background: var(--wcpi-color-surface);
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    padding: 18px;
    margin-bottom: var(--wcpi-section-gap);
}

/* =========================================================================
   Customer hint banners (Step 2)
   ========================================================================= */

.wcpi-hint-banner {
    padding: 16px 18px;
    border-radius: var(--wcpi-radius-md);
    margin-top: 12px;
    margin-bottom: var(--wcpi-section-gap);
    font-family: inherit;
    line-height: 1.5;
    animation: wcpiFadeIn 0.3s ease;
}

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

.wcpi-hint-banner--info,
.wcpi-hint-banner--accent {
    background-color: var(--wcpi-color-surface);
    border: 1px solid var(--wcpi-color-border);
    border-left: 4px solid var(--wcpi-color-primary);
}

.wcpi-hint-banner__content strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--wcpi-color-text);
    margin-bottom: 4px;
}

.wcpi-hint-banner__content p {
    margin: 0;
    font-size: 13px;
    color: var(--wcpi-color-text-light);
    line-height: 1.6;
}

/* =========================================================================
   DSGVO notice (Art. 13 data processing information)
   ========================================================================= */

.wcpi-dsgvo-notice {
    background-color: var(--wcpi-color-surface);
    border: 1px solid var(--wcpi-color-border);
    border-left: 4px solid var(--wcpi-color-primary);
    border-radius: 0 var(--wcpi-radius-md) var(--wcpi-radius-md) 0;
    padding: 14px 18px;
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-dsgvo-notice__text {
    font-family: inherit;
    font-size: 12px;
    line-height: 1.6;
    color: var(--wcpi-color-text-light);
    margin: 0;
}

/* =========================================================================
   Summary (Step 4)
   ========================================================================= */

.wcpi-summary__products {
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-summary__products h4,
.wcpi-summary__contact h4 {
    font-family: inherit;
    margin-top: 0;
    margin-bottom: 12px;
}

.wcpi-summary__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    overflow: hidden;
}

.wcpi-summary__table th,
.wcpi-summary__table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--wcpi-color-border);
    font-family: inherit;
}

.wcpi-summary__table th {
    font-weight: 600;
    background-color: var(--wcpi-color-surface);
    font-size: 13px;
    color: var(--wcpi-color-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wcpi-summary__table tbody tr {
    transition: background-color 0.2s;
}

.wcpi-summary__table tbody tr:hover {
    background-color: var(--wcpi-color-surface);
}

.wcpi-summary__table tbody tr:last-child td {
    border-bottom: none;
}

.wcpi-summary__table td em {
    color: var(--wcpi-color-text-light);
    font-style: italic;
}

.wcpi-summary__dl {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 6px 16px;
    margin: 0;
}

.wcpi-summary__dl dt {
    font-family: inherit;
    font-weight: 600;
    color: var(--wcpi-color-text-light);
}

.wcpi-summary__dl dd {
    font-family: inherit;
    margin: 0;
}

.wcpi-summary__contact {
    background-color: var(--wcpi-color-surface);
    border: 1px solid var(--wcpi-color-border);
    border-radius: var(--wcpi-radius-md);
    padding: 18px;
    margin-bottom: var(--wcpi-section-gap);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* =========================================================================
   Privacy checkbox
   ========================================================================= */

.wcpi-privacy-group {
    margin-bottom: var(--wcpi-section-gap);
}

.wcpi-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-family: inherit;
}

.wcpi-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--wcpi-color-primary);
    cursor: pointer;
}

.wcpi-checkbox a {
    color: var(--wcpi-color-primary);
}

/* =========================================================================
   Buttons
   ========================================================================= */

.wcpi-btn-primary {
    background-color: var(--wcpi-color-primary);
    color: var(--wcpi-color-button-text);
    border: 2px solid var(--wcpi-color-primary);
    padding: 12px 24px;
    border-radius: var(--wcpi-radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.4;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 106, 179, 0.25);
    letter-spacing: 0.01em;
    min-height: 48px;
}

.wcpi-btn-primary:hover {
    background-color: var(--wcpi-color-primary-hover);
    border-color: var(--wcpi-color-primary-hover);
    box-shadow: 0 4px 12px rgba(0, 106, 179, 0.35);
    transform: translateY(-1px);
}

.wcpi-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 106, 179, 0.2);
}

.wcpi-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.wcpi-btn-secondary {
    background-color: var(--wcpi-color-background);
    color: var(--wcpi-color-text);
    border: 2px solid var(--wcpi-color-border);
    padding: 12px 24px;
    border-radius: var(--wcpi-radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.4;
    transition: border-color 0.25s, color 0.25s, background-color 0.25s, box-shadow 0.25s, transform 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wcpi-btn-secondary:hover {
    border-color: var(--wcpi-color-primary);
    color: var(--wcpi-color-primary);
    background-color: var(--wcpi-color-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* =========================================================================
   Submit button states
   ========================================================================= */

.wcpi-submit-btn {
    min-width: 220px;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1.05em;
}

/* =========================================================================
   Success & error messages
   ========================================================================= */

.wcpi-success-message {
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--wcpi-color-surface) 0%, #e8f4fd 100%);
    border: 2px solid var(--wcpi-color-primary);
    border-radius: var(--wcpi-radius-lg);
    color: var(--wcpi-color-text);
    font-family: inherit;
    font-size: 1.05em;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 106, 179, 0.1);
}

.wcpi-form-error {
    padding: 14px 18px;
    background-color: #fff5f5;
    border: 1px solid var(--wcpi-color-error);
    border-left: 4px solid var(--wcpi-color-error);
    border-radius: var(--wcpi-radius-md);
    color: var(--wcpi-color-error);
    font-family: inherit;
    font-weight: 500;
    margin-bottom: 16px;
}

/* =========================================================================
   Honeypot (visually hidden, not display:none so bots see it)
   ========================================================================= */

.wcpi-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tab-size: 0;
}

/* =========================================================================
   Responsive – tablet (769px–1024px)
   ========================================================================= */

@media (min-width: 769px) and (max-width: 1024px) {
    .wcpi-product-grid--cols-3,
    .wcpi-product-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wcpi-form {
        padding: 24px;
    }

    .wcpi-product-table col.col-custom { width: 160px; }
}

/* =========================================================================
   Responsive – mobile (≤768px)
   ========================================================================= */

@media (max-width: 768px) {
    /* Form container */
    .wcpi-form {
        padding: 20px;
        border-radius: var(--wcpi-radius-md);
    }

    .wcpi-form__title {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    /* Progress bar */
    .wcpi-progress {
        margin-bottom: 20px;
    }

    .wcpi-progress__label {
        display: none;
    }

    .wcpi-progress__number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .wcpi-progress__item::before {
        top: 14px;
    }

    /* Steps */
    .wcpi-step__title {
        font-size: 1.1em;
        margin-bottom: 14px;
    }

    .wcpi-step__nav {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .wcpi-step__nav .wcpi-btn-primary,
    .wcpi-step__nav .wcpi-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .wcpi-step__nav--right {
        align-items: stretch;
    }

    /* Customer type toggle: stack vertically on small screens */
    .wcpi-type-toggle__track {
        flex-direction: column;
    }

    .wcpi-type-toggle__label {
        padding: 14px 18px;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    /* Product grid: always 1 col on mobile */
    .wcpi-product-grid--cols-2,
    .wcpi-product-grid--cols-3,
    .wcpi-product-grid--cols-4 {
        grid-template-columns: 1fr;
    }

    /* Product search */
    .wcpi-product-search__input {
        padding: 10px 12px;
    }

    /* Selected products */
    .wcpi-selected-products {
        padding: 14px;
    }

    .wcpi-selected-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .wcpi-selected-item__controls {
        width: 100%;
        justify-content: flex-end;
    }

    /* Form rows: stack to 1 col */
    .wcpi-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* PLZ field: full width on mobile */
    .wcpi-form-group--zip {
        max-width: none;
    }

    /* Section titles */
    .wcpi-section-title {
        font-size: 0.95em;
        margin-top: 24px;
    }

    /* Delivery method cards */
    .wcpi-delivery-method {
        flex-direction: column;
        gap: 8px;
    }

    .wcpi-delivery-option__card {
        padding: 12px 16px;
    }

    /* Shipping fields */
    .wcpi-shipping-fields {
        padding: 14px;
    }

    /* Hint banners */
    .wcpi-hint-banner {
        padding: 12px 14px;
    }

    .wcpi-hint-banner__content strong {
        font-size: 13px;
    }

    .wcpi-hint-banner__content p {
        font-size: 12px;
    }

    /* Summary */
    .wcpi-summary__table th,
    .wcpi-summary__table td {
        padding: 6px 8px;
        font-size: 13px;
    }

    .wcpi-summary__dl {
        grid-template-columns: 1fr;
    }

    .wcpi-summary__dl dt {
        margin-top: 8px;
    }

    .wcpi-summary__contact {
        padding: 14px;
    }

    /* DSGVO notice */
    .wcpi-dsgvo-notice {
        padding: 10px 14px;
    }

    .wcpi-dsgvo-notice__text {
        font-size: 11px;
    }

    /* Buttons */
    .wcpi-btn-primary,
    .wcpi-btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 48px;
    }

    .wcpi-submit-btn {
        min-width: unset;
        width: 100%;
        padding: 14px 24px;
    }

    /* Success / error */
    .wcpi-success-message {
        padding: 20px;
        font-size: 1em;
    }

    .wcpi-form-error {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* =========================================================================
   Responsive – mobile product table → card view (≤600px)
   ========================================================================= */

@media (max-width: 600px) {
    /* Remove the scrollable table approach */
    .wcpi-product-grid {
        overflow-x: visible;
    }

    .wcpi-product-table {
        min-width: unset;
        table-layout: auto;
    }

    /* Hide table header */
    .wcpi-product-table thead {
        display: none;
    }

    /* Each row becomes a card */
    .wcpi-product-table tbody tr {
        display: block;
        border: 1.5px solid var(--wcpi-color-border);
        border-radius: var(--wcpi-radius-md);
        margin-bottom: 12px;
        padding: 12px;
        background: var(--wcpi-color-background);
    }

    .wcpi-product-table tbody tr:hover {
        border-color: var(--wcpi-color-primary);
        background: var(--wcpi-color-surface);
    }

    /* Each cell becomes a row with label */
    .wcpi-product-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 0;
        border-bottom: 1px solid var(--wcpi-color-border);
        font-size: 13px;
    }

    .wcpi-product-table tbody td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .wcpi-product-table tbody td:first-child {
        padding-top: 0;
    }

    /* Data label via attribute */
    .wcpi-product-table tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        color: var(--wcpi-color-text-light);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
        min-width: 80px;
    }

    /* Thumbnail cell: no label, just show image */
    .wcpi-product-table tbody td.col-thumb {
        display: none;
    }

    /* Name cell: full row */
    .wcpi-product-table tbody td.col-name {
        justify-content: flex-start;
        border-bottom: 2px solid var(--wcpi-color-border);
        padding-bottom: 10px;
        margin-bottom: 2px;
    }

    .wcpi-product-table__name {
        font-size: 14px;
    }

    /* Customization field: full width */
    .wcpi-product-table__custom {
        flex: 1;
        min-width: 0;
    }

    /* Add button: full width */
    .wcpi-product-table__add-btn {
        flex: 1;
        min-height: 44px;
    }

    /* Summary table: card view */
    .wcpi-summary__table thead {
        display: none;
    }

    .wcpi-summary__table tbody tr {
        display: block;
        border: 1px solid var(--wcpi-color-border);
        border-radius: var(--wcpi-radius-sm);
        margin-bottom: 10px;
        padding: 10px;
    }

    .wcpi-summary__table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border-bottom: 1px solid var(--wcpi-color-border);
        font-size: 13px;
    }

    .wcpi-summary__table tbody td:last-child {
        border-bottom: none;
    }

    .wcpi-summary__table tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        color: var(--wcpi-color-text-light);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}

/* =========================================================================
   Responsive – small mobile (≤480px)
   ========================================================================= */

@media (max-width: 480px) {
    .wcpi-form {
        padding: 14px;
    }

    .wcpi-form-group label {
        font-size: 14px;
    }

    .wcpi-form-group input[type="text"],
    .wcpi-form-group input[type="email"],
    .wcpi-form-group input[type="tel"],
    .wcpi-form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Prevents iOS auto-zoom */
    }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    .wcpi-step--active {
        animation: none;
    }

    .wcpi-hint-banner {
        animation: none;
    }

    .wcpi-form-group input,
    .wcpi-form-group textarea,
    .wcpi-form-group select,
    .wcpi-product-search__input,
    .wcpi-product-table__custom,
    .wcpi-btn-primary,
    .wcpi-btn-secondary,
    .wcpi-type-toggle__label,
    .wcpi-delivery-option__card,
    .wcpi-progress__number,
    .wcpi-selected-item__remove,
    .wcpi-product-row {
        transition: none;
    }

    .wcpi-type-toggle__label:hover,
    .wcpi-delivery-option__card:hover,
    .wcpi-btn-primary:hover,
    .wcpi-btn-secondary:hover {
        transform: none;
    }
}
