/* Container padrão do Woo */
.woocommerce-ordering {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

/* Select nativo (fallback) */
.woocommerce-ordering select.orderby {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #111644;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 40px 14px 18px;
    font-size: 14px;
    font-weight: 500;
    min-width: 220px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Estado hover/focus */
.woocommerce-ordering select.orderby:hover,
.woocommerce-ordering select.orderby:focus {
    background: #2a4a6b;
    box-shadow: 0 0 0 3px rgba(52,152,219,.3);
    outline: none;
}

/* Ativação do dropdown custom */
.woocommerce-ordering.custom-dropdown select.orderby {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Custom dropdown wrapper */
.woocommerce-ordering .custom-select {
    position: relative;
    min-width: 220px;
}

/* Botão gatilho */
.woocommerce-ordering .custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #111644;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.woocommerce-ordering .custom-select-trigger:hover {
    background: #2a4a6b;
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

/* Lista de opções */
.woocommerce-ordering .custom-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #111644;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .2s ease;
    z-index: 1000;
    overflow: hidden;
}

.woocommerce-ordering .custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Opção */
.woocommerce-ordering .custom-option {
    padding: 12px 18px;
    color: #ffffff;
    cursor: pointer;
    transition: background .15s ease;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.woocommerce-ordering .custom-option:last-child {
    border-bottom: none;
}

.woocommerce-ordering .custom-option:hover {
    background: #2a4a6b;
}

.woocommerce-ordering .custom-option.selected {
    background: #1f2880;
    font-weight: 600;
}

/* Responsivo */
@media (max-width: 768px) {
    .woocommerce-ordering select.orderby,
    .woocommerce-ordering .custom-select {
        width: 100%;
        min-width: unset;
    }
    .woocommerce-ordering select.orderby {
        font-size: 13px;
        padding: 10px 35px 10px 14px;
    }
}
