.posf-block {
    border: 1px solid #dbe8d7;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(38, 77, 39, 0.08);
}

.posf-block .title_block {
    margin: 0;
    padding: 15px 18px;
    border-bottom: 1px solid #dbe8d7;
    background: linear-gradient(180deg, #f5fbf1 0%, #eaf6e4 100%);
    color: #315d2e;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.posf-content {
    padding: 16px 16px 18px;
}

.posf-form {
    margin: 0;
}

.posf-dimension {
    margin-bottom: 15px;
}

.posf-main-label {
    display: block;
    margin: 0 0 8px;
    color: #2f3b2d;
    font-weight: 700;
    line-height: 1.3;
}

.posf-range {
    display: block;
}

.posf-input-wrap {
    position: relative;
    display: block;
    margin: 0 0 8px;
}

.posf-input-wrap input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 9px 46px 9px 12px;
    border: 1px solid #cddbc9;
    border-radius: 999px;
    background: #fff;
    color: #253124;
    font-size: 14px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.posf-input-wrap input:focus {
    outline: none;
    border-color: #72aa63;
    box-shadow: 0 0 0 3px rgba(105, 167, 88, 0.16);
}

.posf-input-wrap em {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #6d7769;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.posf-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.posf-actions .posf-submit,
.posf-actions .posf-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    box-shadow: none;
}

.posf-actions .posf-submit {
    border: 1px solid #4c9847;
    background: linear-gradient(180deg, #68b25d 0%, #4d9848 100%);
    color: #fff;
}

.posf-actions .posf-submit:hover,
.posf-actions .posf-submit:focus {
    background: linear-gradient(180deg, #72ba66 0%, #43863f 100%);
    color: #fff;
}

.posf-actions .posf-clear {
    border: 1px solid #d0dbcd;
    background: #f7faf5;
    color: #486147;
}

.posf-actions .posf-clear:hover,
.posf-actions .posf-clear:focus {
    background: #eef5ea;
    color: #315d2e;
}

.posf-presets {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #d6e2d2;
}

.posf-presets-title {
    display: block;
    margin-bottom: 10px;
    color: #344231;
    font-weight: 700;
}

.posf-presets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.posf-preset {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 6px 11px;
    border: 1px solid #cfe0c8;
    border-radius: 999px;
    background: #f1f8ed;
    color: #3e6538;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.posf-preset:hover,
.posf-preset:focus {
    background: #e6f2df;
    color: #274c24;
}

.posf-results-page {
    margin-bottom: 24px;
}

.posf-results-summary {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #dbe8d7;
    border-radius: 12px;
    background: #f7fbf5;
    color: #354134;
}

.posf-results-summary a,
.posf-alert a {
    margin-left: 8px;
    color: #3f7e38;
    font-weight: 700;
}

.posf-empty-results-text {
    margin-bottom: 12px;
}

.posf-empty-results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.posf-empty-results-actions .posf-back,
.posf-empty-results-actions .posf-clear-results {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-left: 0;
    padding: 8px 15px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.posf-alert ul {
    margin: 10px 0 0 18px;
}

.posf-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.posf-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #cfe0c8;
    border-radius: 999px;
    background: #fff;
    color: #3e6538;
    font-weight: 700;
    text-decoration: none;
}

.posf-page-current,
.posf-page:hover,
.posf-page:focus {
    border-color: #4c9847;
    background: #5ea654;
    color: #fff;
}

@media (max-width: 767px) {
    .posf-block {
        border-radius: 14px;
    }

    .posf-actions .posf-submit,
    .posf-actions .posf-clear {
        width: 100%;
    }
}

/* Czytelne wyniki wyszukiwania rozmiarowego — niezależne od product-list.tpl motywu */
.posf-results-page {
    width: 100%;
    min-width: 0;
}

.posf-results-list {
    display: block;
    width: 100%;
    margin: 18px 0 6px;
}

.posf-product-card {
    display: flex;
    align-items: stretch;
    gap: 22px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid #dbe8d7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(38, 77, 39, 0.08);
}

.posf-product-image {
    flex: 0 0 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    min-height: 190px;
    padding: 10px;
    border: 1px solid #dbe8d7;
    border-radius: 16px;
    background: #fbfdf9;
    box-sizing: border-box;
    text-decoration: none;
    overflow: hidden;
}

.posf-product-image img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.posf-image-empty {
    color: #6f7b6b;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.posf-product-data {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.posf-product-title {
    margin: 0 0 12px;
    color: #315d2e;
    font-size: 23px;
    line-height: 1.22;
    font-weight: 700;
}

.posf-product-title a {
    color: #315d2e;
    text-decoration: none;
}

.posf-product-title a:hover,
.posf-product-title a:focus {
    color: #234921;
    text-decoration: underline;
}

.posf-product-dimensions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid #d3e3cc;
    border-radius: 14px;
    background: #f3f9ef;
    color: #344231;
    line-height: 1.45;
}

.posf-product-dimensions span {
    font-weight: 700;
}

.posf-product-dimensions strong {
    color: #2e6130;
    font-size: 15px;
    font-weight: 700;
}

.posf-product-description {
    margin: 0 0 16px;
    color: #4a5548;
    font-size: 14px;
    line-height: 1.55;
}

.posf-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 10px;
}

.posf-product-price {
    color: #356b30;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.posf-product-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid #4c9847;
    border-radius: 999px;
    background: linear-gradient(180deg, #68b25d 0%, #4d9848 100%);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
}

.posf-product-view:hover,
.posf-product-view:focus {
    background: linear-gradient(180deg, #72ba66 0%, #43863f 100%);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991px) {
    .posf-product-card {
        gap: 16px;
        padding: 16px;
    }

    .posf-product-image {
        flex-basis: 165px;
        width: 165px;
        min-height: 165px;
    }

    .posf-product-image img {
        max-height: 155px;
    }

    .posf-product-title {
        font-size: 21px;
    }
}

@media (max-width: 767px) {
    .posf-product-card {
        display: block;
        padding: 15px;
        border-radius: 16px;
    }

    .posf-product-image {
        width: 100%;
        min-height: 210px;
        margin: 0 0 15px;
    }

    .posf-product-image img {
        max-height: 200px;
    }

    .posf-product-title {
        font-size: 20px;
    }

    .posf-product-dimensions {
        display: block;
    }

    .posf-product-dimensions span,
    .posf-product-dimensions strong {
        display: block;
    }

    .posf-product-dimensions strong {
        margin-top: 4px;
    }

    .posf-product-meta {
        display: block;
    }

    .posf-product-price {
        margin-bottom: 12px;
    }

    .posf-product-view {
        width: 100%;
    }
}
