/* Продукция */

#products {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    row-gap: 5vh;
    padding: 7.5vh 32px;
    background: #eeeeee;
    font-size: 20px;
}

#agro-products-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 16px;
    row-gap: 24px;
}

#agro-products-slider svg {
    fill: #333333;    
}

#agro-products-slide-left, #agro-products-slide-right {
    display: block;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

#agro-products-slide-left {
    transform: rotate(180deg);
}

#agro-products-cards {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    column-gap: 5rem;
    padding: 0 1rem;
}

.agro-product {
    display: flex;
    column-gap: 2rem;
    row-gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid hsl(0 0% 65% / 1);
}

.agro-product:not([current]) {
    display: none;
}

.agro-product-preview {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    max-width: 480px;
}

.agro-product-description {
    display: flex;
    column-gap: 16px;
    line-height: 130%;
}

.agro-product-description img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.agro-product-title {
    padding-left: 116px;
}

.agro-product-composition {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    row-gap: inherit;
}

.agro-product-composition ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-direction: row;
    column-gap: 1.25rem;
    row-gap: 0.75rem;
    flex-wrap: wrap;
}

.agro-product-composition ul li {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #000000;
    font-size: 1rem;
    color: #eeeeee;
}

.agro-product-macroelements ul li {
    background: #cc7a00;
}

.agro-product-microelements ul li {
    background: #354497;
}

.agro-product-vitamins ul li {
    background: #428a45;
}

.agro-product-vitamins ul li[data-group="B"] {
    background: #9C27B0;
}

.agro-product-usage {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    column-gap: 2.5rem;
    justify-content: center;
    flex-basis: 86px;
}

.agro-product-usage div{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.agro-product-usage svg {
    width: 64px;
    height: 64px;
}

.agro-product-usage-rule {
    text-align: center;
}

@media (max-width: 960px)  {
    .agro-product {
      flex-direction: column;
    }

    .agro-product-usage {
        flex-direction: row;
    }
}

@media (max-width: 768px)  {
    #products {
        font-size: 17px;
    }

    #agro-products-slider {
        flex-wrap: wrap;
        column-gap: 44px;
    }

    #agro-products-cards {
        width: 100%;
        justify-content: center;
    }

    .agro-product-description img {
        width: 75px;
        height: 75px;
    }
    
    .agro-product-title {
        padding-left: 91px;
    }

    #agro-products-slide-left {
        order: 2;
    }

    #agro-products-slide-right {
        order: 3;
    }
}

/* Каталог */

#prices {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    row-gap: 4vh;
    padding: 7.5vh 32px;
    font-size: 20px;
}

#agro-catalog {
    border-collapse: collapse;
    font-size: 85%;
    line-height: 140%;
}

#agro-catalog caption {
    caption-side: bottom;
    padding: 6px 12px 0 0;
    text-align: right;
    text-decoration: underline;
}

#agro-catalog thead {
    background: #f1f1f1;
}

#agro-catalog td, #agro-catalog th {
    padding: 4px 8px;
    border: 2px solid #e2e2e2;
    text-align: center;
}

#agro-catalog tbody tr:nth-child(2n+0) td{
    background: #f1f1f1;
}

td[data-column-id="name"] {
    font-weight: bold;
}

td[data-column-id="protein"]::after, td[data-column-id="vat"]::after {
    content:"%";
    margin-left: 2px;
}

td[data-column-id="price"]::after {
    content:"₽";
    margin-left: 2px;
}

td[data-column-id="packaging"]::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
}

td[data-column-id="packaging"][data-enable="true"]::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 511.985 511.985' fill='%23669933'%3E%3Cpath d='M500.088 83.681c-15.841-15.862-41.564-15.852-57.426 0L184.205 342.148 69.332 227.276c-15.862-15.862-41.574-15.862-57.436 0-15.862 15.862-15.862 41.574 0 57.436l143.585 143.585c7.926 7.926 18.319 11.899 28.713 11.899 10.394 0 20.797-3.963 28.723-11.899l287.171-287.181c15.862-15.851 15.862-41.574 0-57.435z'/%3E%3C/svg%3E");
}

td[data-column-id="packaging"][data-enable="false"]::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512' fill='%23bd0f3b'%3E%3Cpath d='M498.109 430.993a47.458 47.458 0 0 1-67.116 67.116L263.671 330.784a10.848 10.848 0 0 0-15.341 0L81.007 498.109a47.459 47.459 0 0 1-67.117-67.116l167.325-167.319a10.847 10.847 0 0 0 0-15.341L13.891 81.007a47.458 47.458 0 0 1 67.116-67.116L248.33 181.22a10.851 10.851 0 0 0 15.341 0L430.993 13.891a47.458 47.458 0 0 1 67.116 67.116L330.784 248.333a10.847 10.847 0 0 0 0 15.341z'/%3E%3C/svg%3E");
}

@media (max-width: 960px)  {
    #prices {
        font-size: 17px;
    }
}

@media (max-width: 768px)  {
    #prices {
        padding: 7.5vh 12px;
    }
    
    #agro-catalog {
        width: 100%;
    }
    
    #agro-catalog caption {
        text-align: left;
    }

    #agro-catalog thead {
        display: none;
    }
    
    #agro-catalog tbody tr {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 16px;
    }

    #agro-catalog tbody tr:first-child {
        margin-top: unset;
    }

    #agro-catalog tbody tr td {
        width: 100%;
    }
    
    #agro-catalog tbody tr td[data-column-id="name"] {
        border: none;
        background: none;
        padding: 0 0 8px 0;
    }

    #agro-catalog td {
        text-align: right;
    }
    
    #agro-catalog td[data-title]::before {
        content: attr(data-title);
        font-weight: bold;
        float: left;
    }

    #agro-catalog td[data-column-id="packaging"] {
        width: calc((100% - 60px) / 3););
    }
}

@media (max-width: 540px) {
    #agro-catalog td[data-column-id="packaging"] {
        width: 100%;
    }
}