/* IV Catalog Menu — Front CSS */

.iv-catalog-widget {
    padding: 24px 0;
    margin: 16px 0;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
	border-radius: 10px;
}
.iv-catalog-widget__header {
    margin-bottom: 16px;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
    -ms-flex-wrap: wrap; flex-wrap: wrap;
    padding-right: 8px;
}
.iv-catalog-widget__title  { font-size: 18px; font-weight: 700; margin: 0; padding: 0px 0px 0px 30px;}

/* Search */
.iv-catalog-search { position: relative; width: 320px; max-width: 100%; }
.iv-catalog-search__input {
    width: 100%; height: 38px; box-sizing: border-box;
    padding: 6px 34px 6px 36px;
    font-size: 14px; color: #222;
    border: 1px solid #d5d5d5; border-radius: 19px; background: #fff
        url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='M15 15l6 6'/%3E%3C/svg%3E")
        no-repeat 12px center;
    outline: none; -webkit-transition: border-color .15s, box-shadow .15s; transition: border-color .15s, box-shadow .15s;
}
.iv-catalog-search__input:focus { border-color: #c00; box-shadow: 0 0 0 3px rgba(204,0,0,.12); }
.iv-catalog-search__clear {
    position: absolute; right: 6px; top: 50%; margin-top: -13px;
    width: 26px; height: 26px; padding: 0; line-height: 24px;
    border: 0; border-radius: 50%; background: transparent;
    font-size: 20px; color: #999; cursor: pointer;
}
.iv-catalog-search__clear:hover { color: #c00; background: #f2f2f2; }
.iv-catalog-search__hint { padding: 0 30px 10px; font-size: 12px; color: #888; }
.iv-catalog-search__empty { padding: 30px; text-align: center; font-size: 15px; color: #777; }
.iv-catalog-widget mark { background: #ffe58a; color: inherit; padding: 0; border-radius: 2px; }
@media (max-width: 767px) {
    .iv-catalog-widget__header { padding: 0 10px; }
    .iv-catalog-widget__title  { padding-left: 0; margin-bottom: 10px; }
    .iv-catalog-search { width: 100%; }
}

/* Grid — flexbox замість Bootstrap float */
.iv-catalog-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: 0px;
    margin-right: 0px;
}

.iv-catalog-col {
    padding-left: 5px;
    padding-right: 5px;
    margin-bottom: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
/* Card fills the column height; in a stack only the last visible card stretches */
.iv-catalog-col > .iv-catalog-card { -webkit-box-flex: 1; -ms-flex: 1 0 auto; flex: 1 0 auto; }
.iv-catalog-col--stack > .iv-catalog-card { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; }
.iv-catalog-col--stack > .iv-catalog-card + .iv-catalog-card { margin-top: 10px; }
.iv-catalog-col--stack > .iv-catalog-card.iv-is-last { -webkit-box-flex: 1; -ms-flex: 1 0 auto; flex: 1 0 auto; }
.iv-catalog-col--stack > .iv-catalog-card.iv-is-first { margin-top: 0; }

/* Card — розтягується на всю висоту колонки */
.iv-catalog-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-transition: box-shadow .2s;
    transition: box-shadow .2s;
}
.iv-catalog-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.13);
}

/* Title */
.iv-catalog-card__header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.iv-catalog-card__title-link {
    font-size: 14px; font-weight: 700;
    color: #222; text-decoration: none;
    line-height: 1.3; display: block;
}
a.iv-catalog-card__title-link:hover { color: #c00; }

/* Image */
.iv-catalog-card__img-wrap {
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.iv-catalog-card__img-wrap a { display: block; }
.iv-catalog-card__img {
    width: 100%; height: auto;
    display: block;
    -webkit-transition: -webkit-transform .25s;
    transition: transform .25s;
}
.iv-catalog-card:hover .iv-catalog-card__img {
    -webkit-transform: scale(1.04); transform: scale(1.04);
}

/* Subcategories */
.iv-catalog-card__body {
    padding: 10px 12px 12px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}
.iv-catalog-card__subs { list-style: none; margin: 0; padding: 0; }
.iv-catalog-card__sub-item {
    padding: 1px 0 6px 12px; font-size: 14px;
    line-height: 1.2; position: relative;
}
.iv-catalog-card__sub-item::before {
    content: '\2013'; position: absolute; left: 0; color: #bbb;
}
.iv-catalog-card__sub-link { color: #555; text-decoration: none; }
.iv-catalog-card__sub-link:hover { color: #c00; text-decoration: underline; }
.iv-catalog-card__sub-link--nolink { color: #777; cursor: default; }

/* Sections: a divider + its own grid. Full sections take 100%, a divider with
   "span" makes a narrower section, so two of them can sit side by side. */
.iv-catalog-section {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    max-width: 100%;
}
.iv-catalog-section__row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.iv-catalog-section__row > .iv-catalog-col { float: none; }

/* Divider */
.iv-catalog-divider-col {
    width: 100%;
    padding-left: 4px;
    padding-right: 4px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
.iv-catalog-divider {
    padding: 10px 16px;
    background: #f0f0f0;
    border-left: 4px solid #c00;
    border-radius: 2px;
    margin: 4px 0 8px;
}
.iv-catalog-divider__title,
.iv-catalog-divider__link {
    font-size: 15px; font-weight: 700;
    color: #222; text-decoration: none; display: block;
}
a.iv-catalog-divider__link:hover { color: #c00; }

/* Responsive */
@media (max-width: 991px) {
    .iv-catalog-section { width: 100% !important; }
    .iv-catalog-col { width: 50%; }
}
@media (max-width: 767px) {
    .iv-catalog-row { margin-left: -10px; margin-right: -10px; }
    .iv-catalog-col { width: 50%; padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 480px) {
    .iv-catalog-col { width: 100%; }
}
/* Image with a fixed height set per card: fit without cropping, centred */
.iv-catalog-card__img-wrap--fixed,
.iv-catalog-card__img-wrap--fixed > a {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.iv-catalog-card__img-wrap--fixed > a { width: 100%; height: 100%; }
.iv-catalog-card__img-wrap--fixed .iv-catalog-card__img {
    /* fill the set height (upscaling a small source if needed), never wider than the card */
    width: auto; height: 100%;
    max-width: 100%; max-height: 100%;
    -o-object-fit: contain; object-fit: contain;
}
