.estore-dropdown,
select[data-estore-dropdown]:not(.estore-dropdown__native) {
    --estore-dropdown-width: 280px;
    --estore-dropdown-accent: #171717;
    --estore-dropdown-border: #E4E4E7;
    --estore-dropdown-selected-surface: #F5F5F5;
    --estore-dropdown-min-width: 176px;
    --estore-dropdown-control-height: 56px;
    --estore-dropdown-control-padding: 11px 44px 11px 14px;
    --estore-dropdown-control-border: 1px solid rgba(17, 24, 39, 0.12);
    --estore-dropdown-control-radius: 8px;
    --estore-dropdown-control-font-size: 15px;
    --estore-dropdown-control-font-weight: 400;
    --estore-dropdown-control-line-height: 1.45;
    --estore-dropdown-control-letter-spacing: normal;
    --estore-dropdown-value-color: #171717;
    --estore-dropdown-placeholder-color: #737373;
    --estore-dropdown-disabled-color: #9ca3af;
    --estore-dropdown-chevron-placeholder-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --estore-dropdown-chevron-value-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23171717' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --estore-dropdown-chevron-disabled-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --estore-dropdown-chevron-image: var(--estore-dropdown-chevron-placeholder-image);
    --estore-dropdown-chevron-width: 12px;
    --estore-dropdown-chevron-height: 8px;
    --estore-dropdown-chevron-inset: 16px;
}

.estore-dropdown {
    display: block;
    position: relative;
    width: var(--estore-dropdown-width);
    min-width: min(100%, var(--estore-dropdown-min-width));
    max-width: 100%;
    color: var(--estore-dropdown-value-color);
    box-sizing: border-box;
}

select[data-estore-dropdown]:not(.estore-dropdown__native) {
    width: var(--estore-dropdown-width);
    min-width: min(100%, var(--estore-dropdown-min-width));
    max-width: 100%;
    height: var(--estore-dropdown-control-height);
    min-height: 44px;
    box-sizing: border-box;
    padding: var(--estore-dropdown-control-padding);
    overflow: hidden;
    border: var(--estore-dropdown-control-border);
    border-radius: var(--estore-dropdown-control-radius);
    background-color: #ffffff;
    background-image: var(--estore-dropdown-chevron-image);
    background-position: right var(--estore-dropdown-chevron-inset) center;
    background-repeat: no-repeat;
    background-size: var(--estore-dropdown-chevron-width) var(--estore-dropdown-chevron-height);
    color: var(--estore-dropdown-placeholder-color);
    font-family: inherit;
    font-size: var(--estore-dropdown-control-font-size);
    font-weight: var(--estore-dropdown-control-font-weight);
    line-height: var(--estore-dropdown-control-line-height);
    letter-spacing: var(--estore-dropdown-control-letter-spacing);
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

@supports selector(:has(*)) {
    select[data-estore-dropdown]:not(.estore-dropdown__native):not(:disabled):has(option:checked:not([value="0"]):not([value=""])) {
        --estore-dropdown-chevron-image: var(--estore-dropdown-chevron-value-image);
        color: var(--estore-dropdown-value-color);
    }
}

select[data-estore-dropdown]:not(.estore-dropdown__native):hover:not(:disabled) {
    border-color: var(--estore-dropdown-accent);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

select[data-estore-dropdown]:not(.estore-dropdown__native):focus-visible {
    outline: 2px solid rgba(23, 23, 23, 0.18);
    outline-offset: 3px;
    border-color: var(--estore-dropdown-accent);
}

select[data-estore-dropdown]:not(.estore-dropdown__native):disabled {
    --estore-dropdown-chevron-image: var(--estore-dropdown-chevron-disabled-image);
    color: var(--estore-dropdown-disabled-color);
    background-color: #f5f5f5;
    cursor: not-allowed;
    box-shadow: none;
}

.product-details-style-1 .product-details-content .product-select-wrapper .select-item .country-select {
    max-width: 100%;
}

.product-details-style-1 .product-details-content .product-select-wrapper .select-item .country-select select[data-estore-dropdown]:not(.estore-dropdown__native) {
    --estore-dropdown-width: 350px;
}

.product-details-style-1 .product-details-content .product-select-wrapper .select-item .country-select .estore-dropdown {
    --estore-dropdown-width: 350px;
}

.estore-dropdown__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.estore-dropdown__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: var(--estore-dropdown-fixed-height, var(--estore-dropdown-control-height));
    min-height: 44px;
    box-sizing: border-box;
    padding: var(--estore-dropdown-control-padding);
    border: var(--estore-dropdown-control-border);
    border-radius: var(--estore-dropdown-control-radius);
    background: #ffffff;
    color: var(--estore-dropdown-value-color);
    font-family: inherit;
    font-size: var(--estore-dropdown-control-font-size);
    font-weight: var(--estore-dropdown-control-font-weight);
    line-height: var(--estore-dropdown-control-line-height);
    letter-spacing: var(--estore-dropdown-control-letter-spacing);
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.estore-dropdown__trigger::after {
    content: "";
    position: absolute;
    top: 50%;
    right: var(--estore-dropdown-chevron-inset);
    width: var(--estore-dropdown-chevron-width);
    height: var(--estore-dropdown-chevron-height);
    background-image: var(--estore-dropdown-chevron-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: translateY(-50%);
    transition: transform 0.18s ease;
}

.estore-dropdown__trigger:hover:not(:disabled),
.estore-dropdown.is-open .estore-dropdown__trigger:not(:disabled) {
    border-color: var(--estore-dropdown-accent);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.estore-dropdown__trigger:focus-visible {
    outline: 2px solid rgba(23, 23, 23, 0.18);
    outline-offset: 3px;
    border-color: var(--estore-dropdown-accent);
}

.estore-dropdown__trigger:not(.is-placeholder) {
    --estore-dropdown-chevron-image: var(--estore-dropdown-chevron-value-image);
}

.estore-dropdown__trigger.is-placeholder {
    --estore-dropdown-chevron-image: var(--estore-dropdown-chevron-placeholder-image);
    color: var(--estore-dropdown-placeholder-color);
}

.estore-dropdown__trigger:disabled {
    --estore-dropdown-chevron-image: var(--estore-dropdown-chevron-disabled-image);
    color: var(--estore-dropdown-disabled-color);
    background: #f5f5f5;
    cursor: not-allowed;
    box-shadow: none;
}

.estore-dropdown.has-value .estore-dropdown__trigger {
    padding-right: 84px;
}

.estore-dropdown__clear {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #77736E;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    transform: translateY(-50%);
}

.estore-dropdown__clear .mdi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.estore-dropdown__clear:hover .mdi,
.estore-dropdown__clear:active .mdi {
    background: #F5F5F5;
    color: #171717;
}

.estore-dropdown__clear:focus-visible {
    outline: 2px solid rgba(23, 23, 23, 0.28);
    outline-offset: -4px;
}

.estore-dropdown__clear:disabled {
    cursor: default;
}

.estore-dropdown__clear[hidden] {
    display: none;
}

.estore-dropdown.is-open .estore-dropdown__trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.estore-dropdown__current {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estore-dropdown__trigger-image,
.estore-dropdown__option-image {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
}

.estore-dropdown__trigger-image {
    width: 32px;
    height: 32px;
}

.estore-dropdown__option-image {
    width: 40px;
    height: 40px;
}

.estore-dropdown__current-label,
.estore-dropdown__option-label {
    min-width: 0;
}

.estore-dropdown__current-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estore-dropdown__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    min-width: 100%;
    z-index: 30;
    display: none;
    padding: 10px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
}

.estore-dropdown.is-open .estore-dropdown__panel {
    display: block;
}

.estore-dropdown__search {
    width: 100%;
    min-height: 44px;
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 8px;
    background: #f9fafb;
    color: #171717;
    font-size: 15px;
    line-height: 1.45;
}

.estore-dropdown__search:focus {
    outline: none;
    border-color: var(--estore-dropdown-accent);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.12);
}

.estore-dropdown__list {
    max-height: min(280px, 42vh);
    margin: 0;
    padding: 2px;
    overflow-y: auto;
    list-style: none;
}

.estore-dropdown__option,
.estore-dropdown__empty {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 7px;
    color: #171717;
    font-size: 15px;
    line-height: 1.45;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.estore-dropdown__option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.estore-dropdown__option:hover,
.estore-dropdown__option.is-active {
    background: #f7f8fa;
}

.estore-dropdown__option.is-selected {
    background: var(--estore-dropdown-selected-surface);
    color: var(--estore-dropdown-accent);
    font-weight: 600;
}

.estore-dropdown__option.is-disabled {
    color: #9ca3af;
    cursor: not-allowed;
    background: #f5f5f5;
}

.estore-dropdown__empty {
    display: block;
    color: #737373;
    cursor: default;
}

@media (max-width: 767px) {
    .product-details-style-1 .product-details-content .product-select-wrapper .select-item .country-select select[data-estore-dropdown]:not(.estore-dropdown__native) {
        --estore-dropdown-width: 280px;
    }

    .product-details-style-1 .product-details-content .product-select-wrapper .select-item .country-select .estore-dropdown {
        --estore-dropdown-width: 280px;
    }

    .estore-dropdown__panel {
        top: calc(100% + 6px);
        padding: 8px;
        border-radius: 8px;
    }

    .estore-dropdown__list {
        max-height: min(320px, 50vh);
        max-height: min(320px, 50dvh);
    }
}

@media (max-width: 767px),
       (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
    select[data-estore-dropdown]:not(.estore-dropdown__native) {
        --estore-dropdown-control-height: 54px;
        --estore-dropdown-control-padding: 10px 44px 10px 14px;
        --estore-dropdown-control-border: 1px solid #8B8B8B;
        --estore-dropdown-control-radius: 6px;
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-body] .estore-dropdown {
        --estore-dropdown-width: var(--estore-dropdown-fixed-width, 100%);
        --estore-dropdown-control-height: 54px;
        --estore-dropdown-control-padding: 10px 44px 10px 14px;
        --estore-dropdown-control-border: 1px solid #8B8B8B;
        --estore-dropdown-control-radius: 6px;
        width: var(--estore-dropdown-fixed-width, 100%);
        min-width: var(--estore-dropdown-fixed-width, 100%);
        max-width: var(--estore-dropdown-fixed-width, 100%);
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-body] .estore-dropdown .estore-dropdown__trigger {
        min-height: 48px;
        padding: var(--estore-dropdown-control-padding);
        border: var(--estore-dropdown-control-border);
        border-radius: var(--estore-dropdown-control-radius);
        box-shadow: none;
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-body] .estore-dropdown.is-open .estore-dropdown__trigger:not(:disabled) {
        border-color: #171717;
        box-shadow: none;
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-body] .estore-dropdown .estore-dropdown__trigger:focus-visible {
        border-color: #171717;
        outline: 2px solid rgba(23, 23, 23, 0.18);
        outline-offset: 2px;
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-panel] > .estore-dropdown__panel.estore-dropdown__panel--sheet-portal {
        position: absolute;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        min-width: 0;
        max-width: none;
        z-index: 3;
        display: flex;
        box-sizing: border-box;
        flex-direction: column;
        padding: 8px;
        border: 1px solid #E4E4E7;
        border-radius: 6px;
        background: #FFFFFF;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        pointer-events: auto;
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-panel] > .estore-dropdown__panel.estore-dropdown__panel--sheet-portal[hidden] {
        display: none;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__search {
        flex: 0 0 auto;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__option {
        height: 80px;
        min-height: 80px;
        padding: 12px 14px;
        gap: 16px;
        border-radius: 4px;
        color: #171717;
        overflow: hidden;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__option + .estore-dropdown__option {
        border-block-start: 1px solid #EAEAEA;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__option-label {
        display: -webkit-box;
        flex: 1 1 auto;
        min-width: 0;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        line-height: 20px;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__option-image {
        width: 56px;
        height: 56px;
        border-radius: 6px;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__option:hover,
    .estore-dropdown__panel--sheet-portal .estore-dropdown__option.is-active {
        background: #FAFAFA;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__option.is-selected {
        background: #F5F5F5;
        color: #171717;
        font-weight: 700;
    }

    .estore-dropdown__panel--sheet-portal .estore-dropdown__search:focus {
        border-color: #171717;
        box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.12);
    }

    [data-yc-adaptive-dialog="product-confirmation"] [data-yc-adaptive-dialog-body] .estore-dropdown.has-value .estore-dropdown__trigger {
        padding-right: 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .estore-dropdown__trigger,
    .estore-dropdown__trigger::after,
    .estore-dropdown__clear .mdi {
        transition: none;
    }
}
