#feed-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px; /* odstęp między listą a summary */
    flex-wrap: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

#feed-limits-info {
    display: none;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

#feed-quantity-wrapper {
    margin-top: 15px;
    display: none;
    text-align: center;
}

#feed-quantity-wrapper label,
#feed-quantity-wrapper input {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.3em;
}

#feed-quantity {
    margin-top: 10px;
    padding: 6px 10px;
    width: 70px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#feed-quantity:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

#grain-list {
    display: none;
    flex: 1 1 0; /* zajmuje tyle miejsca, ile może */
    min-width: 0;
}

#summary {
    top: 50%;
    position: sticky;
    display: none;
    flex: 0 0 280px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    font-size: 0.9em;
    list-style: none;
}

.grain-warning, #feed-quantity-warning {
    display: none;
    color: red;
    font-size: 0.75em;
    margin: 5px auto; /* <--- wycentrowane */
    padding: 5px 8px;
    max-width: 220px;

    word-break: normal;
    white-space: normal;
    text-align: center;

    background-color: #ffeaea;
    border: 1px solid #ffaaaa;
    border-radius: 5px;
}

#feed-quantity-warning {
    max-width: 280px;
}

.grain-list {
    width: 100%;
    margin-right: 320px; /* tyle, ile zajmuje #summary + odstęp */
    box-sizing: border-box;
}

.grid-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.group-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px; /* odstęp w pionie i poziomie */
    align-items: center;
    padding: 0 20px 10px 20px;
}

.feed-type-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.feed-type-options label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: auto;
    text-align: center;
}

.feed-type-options label:hover {
    background-color: #f5f5f5;
}

.feed-type-options input[type="radio"] {
    display: none;
}

.feed-type-options input[type="radio"]:checked + img,
.feed-type-options input[type="radio"]:checked + span {
    filter: brightness(1.1);
}

.feed-type-options label.selected {
    border: 2px solid #0073aa; /* WordPress blue */
    background-color: #e6f3fa;
    box-shadow: 0 0 6px rgba(0, 115, 170, 0.3);
    transition: all 0.2s ease-in-out;
}

.feed-type-options label.selected span {
    font-weight: bold;
    color: #0073aa;
}

.feed-type-options label.selected img {
    transform: scale(1.05);
}

.feed-type-options img {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    object-fit: contain;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.grid-item span:first-child {
    font-weight: bold;
    margin-bottom: 5px;
}

.grid-item span.title {
    font-weight: bold;
    font-size: large;
    height: auto; /* ustalona wysokość */
    display: block;

    /* font-weight: bold; */
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
    margin-bottom: 5px;
}

span.title span.subtitle {
    font-weight: lighter;
    font-size: small;
}
span.norm {
    font-weight: bolder;
    font-size: small;
}

input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

/* Każda sekcja kategorii */
.collapsible-section {
    border: none;
    transition: border 0.3s ease;
}

/* Klikalny nagłówek kategorii */
.category-toggle {
    display: flex;
    flex-direction: column; /* <-- nowość */
    align-items: flex-start;
    position: relative;
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 16px;
    padding-right: 24px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    border-radius: 6px;
    user-select: none;
}

.category-toggle .arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 10px solid black; /* Strzałka w prawo */
}
.cat-name {
    font-weight: bold;
    font-size: 1.1em;
}
.collapsible-section.open .category-toggle .arrow {
    transform: translateY(-50%) rotate(90deg);
}

.tooltip-wrapper {
    position: relative;
    cursor: help;
}

.tooltip-wrapper .tooltip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75em;
    max-width: 200px;
    min-width: 160px;
    white-space: normal;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    visibility: hidden;
}

.info-hint {
    display: none;
    font-size: 0.5em;
    font-style: italic;
    color: #666;
    margin-top: 2px;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Ukrywanie kategorii */
.category-content {
    display: none;
    transition: all 0.3s ease;
}

/* Pokazywanie rozwiniętych kategorii */
.collapsible-section.open .category-content {
    display: grid;
}
.collapsible-section.open {
    border: 1px solid #ccc;
    border-radius: 6px;
}

#feed-type-options-wrapper {
    text-align: center;
    align-items: center;
}

#buy-now-button {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid black;
}
#buy-now-button > div, #reset-button {
    width: 100%;
    text-align: center;
}
#shipment-info {
    font-size: 0.8em;
    font-weight: bolder;
    margin-bottom: 10px;
    margin-top: 10px;
}
#reset-button {
    background-color: #ff2c25;
}
.category-green {
    background-color: #c8efbc;
}
.category-dark-green {
    background-color: #a2cc94;
}
.category-red {
    background-color: #f5b1b1;
}

.category-yellow {
    background-color: #fae896;
}

.category-blue {
    background-color: #b6ceff;
}
.woocommerce-notices-wrapper .woocommerce-message {
    border-left: 5px solid #007cba; /* niebieski Woo border */
    background: #f1f8ff; /* lekkie niebieskie tło */
    color: #000;
    padding: 15px 20px;
    margin-top: 20px;
    font-size: 1em;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}


@media (max-width: 768px) {
    #shipment-info {
        /*font-size: 0.8em;*/
        margin-top: 0;
    }
    .info-hint {
        display: block;
    }

    #feed-main {
        flex-direction: column;
        align-items: center;
    }

    #grain-list {
        width: 100%;
        margin-right: 0;
    }

    #summary {
        top: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 49vh;
        overflow-y: auto;
        background-color: white;
        padding: 5px 10px;
        border-top: 1px solid #ccc;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        transform: translateY(0); /* <- upewnij się, że nie ma dziwnych transformacji */
    }

    .group-grid-container {
        grid-template-columns: 1fr; /* pojedyncza kolumna dla sliderów */
    }

    .feed-type-options {
        flex-direction: column;
        align-items: center;
    }

    .feed-type-options label {
        width: 90%;
        max-width: 300px;
    }
}

.arrow-bottom{
    display:none;
}

@media (max-width: 768px) {
    .tooltip-text {
        background-color: unset;
        color: black;
        text-align: center;
        border-radius: 6px;
        position: relative;
        z-index: 10;
        bottom: unset;
        left: unset;
        transform: unset;
        white-space: normal;
        max-width: unset;
        min-width: 160px;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
        padding-top: unset;
        font-weight: 300;
        font-size: 14px;
        padding-top: 5px;
        padding-bottom: 5px;
        border: 1px solid black;
        margin-top: 5px !important;
        margin-bottom: 5px !important;
    }

}