.mdl-search-form {
    position: relative;
}

.mdl-search-popup {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 100%;
    min-width: 320px;
    z-index: 9999;
}

.mdl-search-dropdown {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    width: 460px;
}

.mdl-search-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 10px;
}

.mdl-search-dropdown__title,
.mdl-search-dropdown__section-title {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: #1f1f1f;
}

.mdl-search-dropdown__close,
.mdl-search-dropdown__history-remove,
.mdl-search-clear {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #8f8f8f;
    transition: color .2s ease, background .2s ease;
}

.mdl-search-dropdown__close:hover,
.mdl-search-dropdown__history-remove:hover,
.mdl-search-clear:hover {
    color: #1f1f1f;
}

.mdl-search-dropdown__close {
    width: 18px;
    height: 18px;
}

.mdl-search-dropdown__close svg,
.mdl-search-dropdown__history-remove svg,
.mdl-search-clear svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mdl-search-dropdown__section {
    padding: 0 10px 8px;
}

.mdl-search-dropdown__section-title {
    padding: 8px 8px 10px;
}

.mdl-search-dropdown__history-list {
    list-style: none;
    margin: 0;
    padding: 0 10px 12px;
}

.mdl-search-dropdown__history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease;
}

.mdl-search-dropdown__history-item:hover {
    background: #f7f7f7;
}

.mdl-search-dropdown__history-text {
    display: block;
    min-width: 0;
    font-size: 14px;
    color: #1f1f1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mdl-search-dropdown__history-remove {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
}

.mdl-search-item {
    display: flex;
    gap: 12px;
    padding: 5px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: background .2s ease;
}

.mdl-search-item:hover {
    background: #f7f7f7;
}

.mdl-search-item__thumb {
    width: 62px;
    min-width: 62px;
    height: 62px;
    border-radius: 10px;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdl-search-item__thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.mdl-search-item__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mdl-search-item__name {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: #1f1f1f;
    margin-bottom: 1px;
}

.mdl-search-item__price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: -5px;
}

.mdl-search-item__price {
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
}

.mdl-search-item__new-price {
    color: #d32029;
}

.mdl-search-item__old-price {
    font-size: 13px;
    color: #9a9a9a;
    text-decoration: line-through;
}

.mdl-search-item__currency {
    font-size: 12px;
    font-weight: 400;
}

.mdl-search-dropdown__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 8px;
    border-radius: 10px;
    text-decoration: none;
    color: #1f1f1f;
    transition: background .2s ease;
}

.mdl-search-dropdown__category:hover {
    background: #f7f7f7;
}

.mdl-search-dropdown__category-count {
    color: #8f8f8f;
    font-size: 13px;
    white-space: nowrap;
}

.mdl-search-dropdown__footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 18px 14px;
}

.mdl-search-dropdown__footer a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
}

.mdl-search-dropdown__empty,
.mdl-search-dropdown__loading {
    padding: 22px 18px;
    text-align: center;
    font-size: 14px;
    color: #595959;
}

.mdl-search-dropdown__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mdl-search-dropdown__spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #e5e5e5;
    border-top-color: #1f1f1f;
    border-radius: 50%;
    animation: mdl-search-spin .8s linear infinite;
}

.mdl-search-clear {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.mdl-search-dropdown mark {
    background: #fff2a8;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

@keyframes mdl-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.mdl-search-item__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.mdl-search-item__price-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.mdl-search-item__model-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.mdl-search-item__model-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.mdl-search-item__model {
    font-size: 12px;
    line-height: 1.2;
    color: #666;
    white-space: nowrap;
}

.mdl-search-item__copy-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    flex: 0 0 auto;
}

.mdl-search-item__model-wrap:hover .mdl-search-item__copy-btn {
    opacity: 1;
    visibility: visible;
}

.mdl-search-item__copy-btn.is-copied {
    opacity: 1;
    visibility: visible;
}

.mdl-search-item__copy-btn {
    width: 18px;
    height: 18px;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
}
.mdl-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.mdl-search-item__link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
}

.mdl-search-item__content {
    display: flex;
    flex-direction: column;
    min-width: 100%;
    flex: 1 1 auto;
    width: 100%;
}

.mdl-search-item__price-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

.mdl-search-item__price-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.mdl-search-item__model-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 90px;
}

.mdl-search-item__model-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mdl-search-item__model {
    font-size: 12px;
    line-height: 1.2;
    color: #666;
    white-space: nowrap;
}

.mdl-search-item__copy-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.mdl-search-item__model-wrap:hover .mdl-search-item__copy-btn,
.mdl-search-item__copy-btn.is-copied {
    opacity: 1;
    visibility: visible;
}
.mdl-search-entry {
    position: relative;
}

.mdl-search-entry .mdl-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 120px; /* місце під модель */
    position: relative;
}

.mdl-search-entry__model-side {
    #position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    #align-items: center;
    justify-content: flex-end;
    pointer-events: auto;
    margin-top: -9px;
}

.mdl-search-entry__model-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.mdl-search-entry__model {
    font-size: 12px;
    line-height: 1.2;
    color: #666;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mdl-search-entry__copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 15px;
    flex: 0 0 18px;
    cursor: pointer;
    border: 0;
    padding: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    transition: transform .15s ease, opacity .2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
}

.mdl-search-entry {
    overflow: visible !important;
}

.mdl-search-entry .mdl-search-item {
    overflow: visible !important;
}

.mdl-search-entry__model-side {
    z-index: 50 !important;
}

.mdl-search-entry__copy-btn.is-copied {
    background-size: 14px 14px;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328a745' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    transform: scale(1.1);
}
.product-thumb__meta .product-thumb__code-wrap{
    display: none;
}

.product-thumb__code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.product-thumb__code {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
}

.product-thumb__code-value {
    white-space: nowrap;
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mdl-search-entry__copy-btn::before,
.product-thumb__copy-btn::before {
    content: none;
}

.product-thumb__copy-btn {
    position: relative;
    top: -1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    cursor: pointer;
    border: 0;
    padding: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    transition: transform .15s ease, opacity .2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
}

.product-thumb__copy-btn:hover {
    opacity: 0.7;
}

.product-thumb__copy-btn.is-copied {
    background-size: 14px 14px;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328a745' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    transform: scale(1.1);
}

.product-thumb__meta-item:not(:last-child) {
    margin-right: 10px;
}

.product-thumb__meta .product-thumb__code-wrap {
    margin-top: 5px;
}

.mdl-search-item__availability {
    display: block;
    margin-top: 0;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
}

.mdl-search-item__availability--in-stock {
    color: #279f1e;
}

.mdl-search-item__availability--waiting {
    color: #f3c804;
}

.mdl-search-item__availability--none {
    color: #999;
}

#title-search-input::-webkit-search-cancel-button,
#title-search-input::-webkit-search-decoration,
#title-search-input::-webkit-search-results-button,
#title-search-input::-webkit-search-results-decoration {
    display: none;
    -webkit-appearance: none;
}

#title-search-input::-ms-clear,
#title-search-input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

@media (max-width: 767px) {
    .mdl-search-popup {
        min-width: 0;
    }

    .mdl-search-dropdown {
        border-radius: 14px;
        width: 100%;
    }

    .mdl-search-item__thumb {
        width: 54px;
        min-width: 54px;
        height: 54px;
    }

    .mdl-search-clear {
        right: 46px;
    }

    .mdl-search-entry .mdl-search-item {
        padding-right: 20px;
        padding-bottom: 24px;
        border-bottom: 1px solid #dedede;
        border-radius: 0;
    }

    .mdl-search-entry__model-side {
        top: calc(100% - 24px);
        transform: translate(0);
    }

    .mdl-search-item__content{
        min-width: 77%;
        width: 77%;
    }
    .mdl-search-entry__model {
        max-width: 101px;
    }
}